package cn.hpe.action;

import cn.hpe.services.IndexServices;
import org.hibernate.annotations.AttributeAccessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

/**
 * Created by qq601 on 2016/9/30 0030.
 */

@Controller("pageAction")
public class PageAction {

    private String url=null;

    @Autowired
    IndexServices indexServices;

    public String init(){
        indexServices.initIndexPage();
        return "index";
    }

    public String urlMove() {
    	String temp = url;
    	url=null;
        if ("index".equals(temp)) {
            return init();
        } else {
            return temp;
        }
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }


}
